
<div class="jobs index">
	<h2>
	<?php __('Jobs');?>
	</h2>
	<?php echo $this->Form->create(false,array('type' => 'post','enctype'=>'multipart/form-data','action'=>'deleteall'));?>
	<table cellpadding="0" cellspacing="0">
		<tr class='round'>
			<th><?php echo $this->Paginator->sort('id');?>
			</th>
			<th><?php echo $this->Paginator->sort('name');?>
			</th>
			<th><?php echo $this->Paginator->sort('category_id');?>
			</th>
			<th><?php echo $this->Paginator->sort('user_id');?>
			</th>
			<th><?php echo $this->Paginator->sort('des');?>
			</th>
			<th><?php echo $this->Paginator->sort('company');?>
			</th>
			<th><?php echo $this->Paginator->sort('position');?>
			</th>
			<td><?php echo $this->Form->checkbox('all', array('id'=>'select_all','value' => 1)); ?>
			</td>
			<?php if ($isadmin) : ?>
			<th class="actions"><?php __('Actions');?>
			</th>
			<?php endif ?>
		</tr>
		<?php
		$i = 0;
		foreach ($jobs as $job):
		$class = null;
		if ($i++ % 2 == 0) {
			$class = ' class="even"';
		}else{
			$class = ' class="odd"';
		}
		?>
		<tr <?php echo $class;?>>
			<td><?php echo $job['Job']['id']; ?>&nbsp;</td>
			<td><?php echo $job['Job']['name']; ?>&nbsp;</td>
			<td><?php echo $this->Html->link($job['Category']['name'], array('controller' => 'categories', 'action' => 'view', $job['Category']['id'])); ?>
			</td>
			<td><?php echo $this->Html->link($job['User']['name'], array('controller' => 'users', 'action' => 'view', $job['User']['id'])); ?>
			</td>
			<td><?php echo $job['Job']['des']; ?>&nbsp;</td>
			<td><?php echo $job['Job']['company']; ?>&nbsp;</td>
			<td><?php echo $job['Job']['position']; ?>&nbsp;</td>
			<td><?php echo $this->Form->checkbox('Job.'.$job['Job']['id'], array('value' => 1,'class'=>'unselect')); ?>&nbsp;</td>
			<?php if ($isadmin) : ?>
			<td class="actions"><?php echo $this->Html->link(__('View', true), array('action' => 'view', $job['Job']['id'])); ?>
			<?php echo $this->Html->link(__('Edit', true), array('action' => 'edit', $job['Job']['id'])); ?>
			<?php echo $this->Html->link(__('Delete', true), array('action' => 'delete', $job['Job']['id']), null, sprintf(__('Are you sure you want to delete # %s?', true), $job['Job']['id'])); ?>
			</td>
			<?php endif ?>
		</tr>
		<?php endforeach; ?>
	</table>
	<?php echo $this->Form->end('Delete All');?>
	<p>
	<?php
	echo $this->Paginator->counter(array(
	'format' => __('Page %page% of %pages%, showing %current% records out of %count% total, starting on record %start%, ending on %end%', true)
	));
	?>
	</p>

	<div class="pagination">
	<?php echo $this->Paginator->prev('<< ' . __('previous', true), array(), null, array('class'=>'disabled'));?>
		|
		<?php echo $this->Paginator->numbers();?>
		|
		<?php echo $this->Paginator->next(__('next', true) . ' >>', array(), null, array('class' => 'disabled'));?>
	</div>
</div>
		<?php if ($isadmin) : ?>
<div class="actions">
	<h3>
	<?php __('Actions'); ?>
	</h3>
	<ul>
		<li><?php echo $this->Html->link(__('New Job', true), array('action' => 'add')); ?>
		</li>
		<li><?php echo $this->Html->link(__('List Categories', true), array('controller' => 'categories', 'action' => 'index')); ?>
		</li>
		<li><?php echo $this->Html->link(__('New Category', true), array('controller' => 'categories', 'action' => 'add')); ?>
		</li>
		<li><?php echo $this->Html->link(__('List Users', true), array('controller' => 'users', 'action' => 'index')); ?>
		</li>
		<li><?php echo $this->Html->link(__('New User', true), array('controller' => 'users', 'action' => 'add')); ?>
		</li>
	</ul>
</div>
<?php endif ?>